package com.bw.zhuangao5___day002.Fragment.Books;

import android.view.View;
import android.widget.ImageView;

import com.blankj.utilcode.util.ToastUtils;
import com.bw.zhuangao5___day002.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * create by ertu
 * create on 2021/9/19
 * description
 */
public class BaseLinearMannager extends BaseQuickAdapter<JavaList, BaseViewHolder> {
  int creter =0;
    public BaseLinearMannager( @Nullable List<JavaList> data) {
        super(R.layout.gsvyshipinlayout2, data);

    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, JavaList javaList) {
        StandardGSYVideoPlayer  view = baseViewHolder.getView(R.id.gsyvyang);
        view.setUp(ListBooks.lister[creter],true,"啊啊吖");
        view.setLooping(true);// 设置循环
        view.setShowFullAnimation(true);//是否使用全屏动画效果
        view.setRotateViewAuto(true);//是否开启自动旋转
        view.setAutoFullWithSize(true);//是否根据视频尺寸，自动选择竖屏全屏或者横屏全屏，注意，这时候默认旋转无效
        view.setNeedAutoAdaptation(true);//是否需要适配在竖屏横屏时，由于刘海屏或者打孔屏占据空间，导致标题显示被遮盖的问题
        creter++;
    }
}
